package design_pattern.immutableMode;

/**
 * @Author: 蔡翔
 * @Date: 2019/11/6 8:44
 * @Version 1.0
 */
public class UsePersonThread extends Thread {
    private Person person;
    public UsePersonThread(Person person){
        this.person = person;
    }

    @Override
    public void run() {
        while (true){
            System.out.println(Thread.currentThread().getName()+" print "+person.toString());
        }
    }
}
